#include <iostream>
using namespace std;

signed main()
{
    int k,n;
    cin>>k;
    for(int i=0;i<k;i++){
        cin>>n;
        int a[1005],row[2005] = {0},diagonal[2005] = {0},flag = 1;
        for(int j=1;j<=n;j++){
            cin>>a[j];
            row[a[j]]++;
            diagonal[a[j]+j]++;
        }
        for(int j=1;j<=2*n;j++){
            if(row[j]>1||diagonal[j]>1)    flag = 0;
        }
        if(flag)    cout<<"YES\n";
        else    cout<<"NO\n";
    }
    return 0;
}
